home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
editor
/
pagin707.zip
/
PAGDEMO.#1
< prev
next >
Wrap
Text File
|
1997-02-22
|
3KB
|
92 lines
# % PAGDEMO.#1
# LENGTH=80 PAGE=60
# TITLE CENTER
^N (page ^B)
(Source file created ^A, the paginated version created ^D)
# END
# FOOTER CENTER
Sample footer (is only on the first page)
# END
# ALIGN LENGTH=50
This file demostrates some of the features of the PAGINATE program.
There are a couple of sections of text here which are entered into the
control file in simple free-form text. Currently, we're displaying
the text using "ALIGN" and "LENGTH=50". "ALIGN" roughly evens out
line lengths and makes them flush left. Now, let's change over to
"RIGHT" and "LENGTH=45" (the command case doesn't matter) and see how
it looks...
# right length=45
"RIGHT" roughly evens out line lengths and makes them flush
right. Frankly, I've never seen much of a purpose in this
arrangement but it's used by some people so what the heck. Try
to please everyone...
# JUSTIFY LENGTH=40
Here we are, shifted over to justification instead of alignment and
of course changed the length of the lines again to make it obvious.
Remember that justification makes the text line up on the right-hand
margins whereas alignment doesn't.
(New paragraph here) Another shift is about to happen here. We're going
to see how indentation can be used to show indented points. This demo
shows several features of the PAGINATE program including:
# INDENT 4-3 LENGTH=50
* The use of ALIGN and PAGINATE. These were already demonstrated. Note
that the lengths for the margins can be specified separately as necessary.
* The reading of ASCII-delimited text to create tables. You can also read
in dBase files if desired.
* The ability to sort the data. Note that you don't really need to combine
sorting with actual text. You could use PAGINATE to just sort an entire data
set (wouldn't be real efficient but it's free so why not).
# INDENT 0
We're shifting over to show a table. This table originally looked like this:
# VERBATIM
# INCLUDE PAGDEMO.#1D
It's being processed by a field-definition file that looks like this:
# INCLUDE PAGDEMO.#1C
# % Dropping the footer since I found myself viewing the resulting file
# % during testing, seeing a bunch of blank lines, figuring the file was
# % done, and wondering what happened to the rest of it.
# -FOOTER
# EJECT
# JUSTIFY
When you process the the file, you end up with a simple table that looks
like this:
# HEADING
^H
# END
# INDEF=PAGDEMO.#1C
# FROM ASCII
# INCLUDE PAGDEMO.#1D
# FROM FIXED
# JUSTIFY
Additionally, you can request that the routine sort the data for you. This
can be done sorting by columns or by variables. In our case, we're going to
sort the file based on the value in the first numeric column:
# SORT 2
# FROM ASCII
# INCLUDE PAGDEMO.#1D
# SORT 0
# FROM FIXED
# JUSTIFY
Another example, this time with a descending sort based on the stub column.
# SORTD 1
# FROM ASCII
# INCLUDE PAGDEMO.#1D